<include file="../Public/header" />
<include file="../Public/left" />
<link type="text/css" href="../Public/Js/sop_cart.css" rel="stylesheet">
<script type="text/javascript" src="../Public/Js/cart.js"></script>
<script type="text/javascript" src="../Public/Js/Region.js"></script>

<div class="col2">
    <div class="list1">
      <div class="list1_title"><a href="/">Home</a> > Shopping Cart</div>
      <div class="list2_content">
        <div id="checkoutbox">
    
          
          <div><img src="../Public/images/order2.gif" /></div>
          
          <form action="{:U('Cart/checkout')}" method="post" name="cart"  >
            <fieldset>
                <legend> <span style="color:#669900">Shopping Cart List</span></legend>
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
             <tr>
        <td>
        <div class="cartlist">
        <table width="100%" border="0" cellspacing="0" cellpadding="0"  style="border:1px #CCCCCC solid;border-collapse:collapse" >
			  <tr id="huo_d">
			    <td width="18%" height="25" bgcolor="#F5f5f5" align="center">IMAGE</td>
			    <td width="8%" height="25" bgcolor="#F5f5f5" align="center">ID</td>
			    <td width="32%" height="25" bgcolor="#F5f5f5" align="center">ITEM NAME</td>
			    <td width="20%" height="25" bgcolor="#F5f5f5" align="center">Model</td>
			    <td width="10%" height="25" bgcolor="#F5f5f5" align="center">QTY.</td>
			    <td width="20%" height="25" bgcolor="#F5f5f5" align="center">PRICE</td>
			    <td width="20%" height="25" bgcolor="#F5f5f5" align="center">TOTAL</td>
			  </tr>
			  <volist name="list" id="vo">
			  <tr>
			    <td width="18%" align="center"><a href="{:build_url($vo,'pid')}" target="_blank" title="{:build_url($vo,'pro_name')}"><img src="{:build_url($vo,'pro_smallimage')}" alt="{:build_url($vo,'pro_name')}" width="100" height="75" border="0"></a></td>
			    <td width="8%" align="center">{$vo.pid}</td>
			    <td width="32%" align="center">{:build_url($vo,'pro_name')}</td>
			    <td width="20%" align="center">
					    <volist name="vo['model']" id="subvo">
					{$subvo['name']}:{$subvo['value']}<br/>
					
					<input type="hidden" name="model_name_{$vo.id}[]" value="{$subvo['name']}" />
					<input type="hidden" name="model_value_{$vo.id}[]" value="{$subvo['value']}" /><br/>
					</volist>
				</td>
	    <td width="10%" align="center">{$vo.count}</td>
	    <td width="20%" align="center">{:getprice($vo['price'],$vo['pricespe'],false)}</td>
	    <td width="20%" align="center">{:getprice($vo['price_total'],$vo['pricespe_total'],false)}</td>
  		</tr>
  		</volist>
  		<tr>
  		<td colspan="7" align="right" style="text-align: right; padding-right:5px;" id="get_total_amount"> 

 Items Total: <strong style="color:red;font-weight:bold">{$itemTotal}</strong><br/>
  <gt name="totalWeight" value="0">
 Total Weight: <strong style="color:red;font-weight:bold">{$totalWeight} KG</strong><br/>
 </gt>
  <notempty name="discount['text']">
 Sub Total: <strong style="color:red;font-weight:bold">{$cartTotal}</strong><br/>
 Discount: <strong style="color:red;font-weight:bold">{$discount.text}</strong><br/>
  </notempty>
 Total Amount: <strong style="color:red;font-weight:bold">{$totalAmount}</strong>
		  </td>
		  </tr>
</table>

        </td>
        </tr>
        </table>
            </fieldset>
            <fieldset>
                <legend> <span style="color:#669900">Confirm the receipt of information</span></legend>
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td>
          <div class="dizhi">
            <ul>  
            <gt name="mid" value="0">
            
            <li> 
            <input type="radio" name="delivery"  value="0" />
            {:get_region_name($member_ShippingAddress['country'])} , 
            {:get_region_name($member_ShippingAddress['state'])} , 
            {$member_ShippingAddress['city']} , 
            {$member_ShippingAddress['address']} 
            (
            <strong>Consignee</strong>:{$member_Info['lastname']}&nbsp;{$member_Info['firstname']} , 
            <strong>Telphone</strong>:{$member_ShippingAddress['telphone']} , 
            <strong>Zip code</strong>:{$member_ShippingAddress['zip']}
            ) </li> 
	      <input type="hidden" id="country" value="{$member_ShippingAddress['country']}" />
	      <input type="hidden" id="state" value="{$member_ShippingAddress['state']}" />
	      <input type="hidden" id="city" value="{:get_region_id($member_ShippingAddress['city'])}" />
	      <input type="hidden" id="address" value="{$member_ShippingAddress['address']}" />
	      <input type="hidden" id="firstname" value="{$member_ShippingAddress['firstname']}" />
	      <input type="hidden" id="lastname" value="{$member_ShippingAddress['lastname']}" />
	      <input type="hidden" id="telphone" value="{$member_ShippingAddress['telphone']}" />
	      <input type="hidden" id="zip" value="{$member_ShippingAddress['zip']}" />
            </gt>
            
            
            <li> <input type="radio" name="delivery"  value="1" checked /> Other Shipping Address </li> 
            
            
            
            
            
            
            </ul>
            <script language="JavaScript" type="text/javascript">
            <if condition="$mid gt 0 and $quickbuy eq 0">
            	$('input:radio[name=delivery][value=0]').attr('checked',true);
            <else/>
            	$('input:radio[name=delivery][value=1]').attr('checked',true);
            </if>
            </script>
          
            <ul class="o_address <eq name="quickbuy" value="0">hide</eq>">
               <table border="0px" width="100%">
               <tr>
                  <td>Email</td>
                  <td>
                  <input name="delivery_email" value="{$member_Info['email']}" type="text"  dataType="Email" msg="Email format is not correct!"/><span style="color:red">*</span>
                  </td>
               </tr>
               <tr>
                  <td>First Name</td>
                  <td>
                  <input name="delivery_firstname" value="{$member_Info['delivery_firstname']}" type="text"  dataType="Require" msg="First Name is required!"   /><span style="color:red">*</span>
                  </td>
               </tr>
               <tr>
                  <td>Last Name</td>
                  <td>
                 <input name="delivery_lastname" type="text"    dataType="Require" msg="Last Name is required!" /><span style="color:red">*</span>
                  </td>
               </tr>
               
               <tr>
                  <td>Address</td>
                  <td>
                 <input name="delivery_address" type="text" class="required"    dataType="Require" msg="Address is required!"/><span style="color:red">*</span>
                  </td>
               </tr>
               <tr>
                  <td>Compnay</td>
                  <td>
                 <input name="delivery_compnay" type="text" class="required"   />
                  </td>
               </tr>
               <tr>
                  <td>Country</td>
                  <td>
                 <select name="delivery_country" id="selCountries" onchange="loadRegion('selCountries',1,'selProvinces','{:U('Home-Ajax/getRegion')}');"     dataType="Require" msg="Country is required!" >
                    <option value="0" >-please select-</option>
                    <iterate name="country" id="vo">
                    <option value="{$vo.id}">{$vo.name}</option>
                    </iterate>
                  </select><span style="color:red">*</span>
                  </td>
               </tr>
               
               <tr>
                  <td>State/Province</td>
                  <td>
                   <select name="delivery_state" id="selProvinces" onchange="loadRegion('selProvinces',2,'selCities','{:U('Home-Ajax/getRegion')}');"    dataType="Require" msg="State/Province is required!" >
                    <option value="0">-please select-</option>
                  </select><span style="color:red">*</span>
                  </td>
               </tr>
               <tr>
                  <td>City</td>
                  <td>
                   <select name="delivery_city" id="selCities"     dataType="Require" msg="City is required!">
                    <option value="0">-please select-</option>
                  </select><span style="color:red">*</span>
                  </td>
               </tr>
               <tr>
                  <td>Zip/Postal Code</td>
                  <td>
                 <input name="delivery_zip" type="text"   dataType="Require" msg="Zip/Postal Code is required!"/><span style="color:red">*</span>
                  </td>
               </tr>
               <tr>
                  <td>Telephone</td>
                  <td>
                 <input name="delivery_telephone" type="text"   />
                  </td>
               </tr>
               
               </table>
            </ul>
            <ul class="ding"><li>Leave Word：<textarea name="BuyNote" cols="110" rows="3" style="width:95%"></textarea></li></ul>
          </div>
        </td>
      </tr>
    </table>
            </fieldset>
            <fieldset>
                <legend> <span style="color:#669900">Distribution is recognized</span></legend>
                <table width="100%" border="0" cellspacing="0" cellpadding="0" >
      <tr>
        <td>
          <div class="shou1 hide"  id="shippingmsg">
              Please select the delivery address！
          </div>
          <div class="songh" id="shippingtype">
          
            <table width="100%" style="border:1px #CCCCCC solid" cellspacing="0" cellpadding="0" id="shippingbox">
            <?php $count=count($ShippingList); ?>
      <volist name="ShippingList" id="vo">
       <tr>
        <td class="huo_d"> <input type="radio" value="{$vo.id}" name="shipping_id"  <eq name="i" value="$count">dataType="Group"  msg="Must choose a shipping" </eq>> {$vo.name}</td>
        <td class="huo_f"><span>+{:getprice_str($vo['price'])}</span> </td>
      </tr>
      </volist>
     
    </table>
          </div>
        </td>
      </tr>
    </table>
            </fieldset>
            <fieldset>
                <legend> <span style="color:#669900">Payment confirmation</span></legend>
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td>
          <div class="songh">
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
      
    </table>
            <table width="100%" style="border:1px #CCCCCC solid" cellspacing="0" cellpadding="0">
            <?php $count=count($paymentlist); ?>
          <volist name="paymentlist" id="vo">
      <tr>
        <td class="huo_d"><input id="{$vo.id}" type="radio" value="{$vo.name}" name="payment_module_code" <eq name="i" value="$count">dataType="Group" msg="Must choose a payment"</eq> /> {$vo.title}</td>
        <td class="huo_f"><a href="#"><img src="__ROOT__/{$vo.img_url}" alt="" border="0" /></a> <br/>{:GetSettValue($vo['name']."_remark")} </td>
      </tr>
    </volist>     
    </table>
          </div>
        </td>
      </tr>
    </table>
            </fieldset>
          <div class="shou1">
      <input type="hidden" id="Shipping_area_url" value="{:U('Ajax/get_shipping_list')}" />
      <input type="hidden" id="get_total_amount_url" value="{:U('Ajax/get_total_amount')}" />
     <input type="image" src="../Public/images/button_confirm_order.gif" alt="Continue" title=" Continue " />
      
          </form>
          
          </div>
      </div>
      
</div>
      </div>
    </div>

    <!--end col5-->


<include file="../Public/footer" />